From 94c898857823f9a8be3517d7f05a8dcf9219b00b Mon Sep 17 00:00:00 2001 From: "cl349@arcadians.cl.cam.ac.uk" Date: Thu, 16 Dec 2004 16:22:20 +0000 Subject: [PATCH] bitkeeper revision 1.1159.205.1 (41c1b63cODLXVNkV2OsvJtzvIRxtKg) Remove VIRQ_MISDIRECT altogether. --- xen/common/event_channel.c | 12 +++++------- xen/include/public/xen.h | 13 ++++++------- xen/include/xen/sched.h | 11 ++++++----- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index bf5170c683..bc9a92052d 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -256,11 +256,9 @@ static long evtchn_bind_virq(evtchn_bind_virq_t *bind) /* * Port 0 is the fallback port for VIRQs that haven't been explicitly - * bound yet. The exception is the 'misdirect VIRQ', which is permanently - * bound to port 0. + * bound yet. */ if ( ((port = ed->virq_to_evtchn[virq]) != 0) || - (virq == VIRQ_MISDIRECT) || ((port = get_free_port(ed)) < 0) ) goto out; @@ -353,8 +351,7 @@ static long __evtchn_close(struct domain *d1, int port1) chn1 = d1->event_channel; - /* NB. Port 0 is special (VIRQ_MISDIRECT). Never let it be closed. */ - if ( (port1 <= 0) || (port1 >= d1->max_event_channel) ) + if ( (port1 < 0) || (port1 >= d1->max_event_channel) ) { rc = -EINVAL; goto out; @@ -363,6 +360,7 @@ static long __evtchn_close(struct domain *d1, int port1) switch ( chn1[port1].state ) { case ECS_FREE: + case ECS_RESERVED: rc = -EINVAL; goto out; @@ -541,6 +539,7 @@ static long evtchn_status(evtchn_status_t *status) switch ( chn[port].state ) { case ECS_FREE: + case ECS_RESERVED: status->status = EVTCHNSTAT_closed; break; case ECS_UNBOUND: @@ -645,8 +644,7 @@ int init_event_channels(struct domain *d) /* Call get_free_port to initialize d->event_channel */ if ( get_free_port(d->exec_domain[0]) != 0 ) return -EINVAL; - d->event_channel[0].state = ECS_VIRQ; - d->event_channel[0].u.virq = VIRQ_MISDIRECT; + d->event_channel[0].state = ECS_RESERVED; return 0; } diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h index 057b0bd76e..d963c64313 100644 --- a/xen/include/public/xen.h +++ b/xen/include/public/xen.h @@ -68,13 +68,12 @@ * * Virtual interrupts that a guest OS may receive from Xen. */ -#define VIRQ_MISDIRECT 0 /* Catch-all interrupt for unbound VIRQs. */ -#define VIRQ_TIMER 1 /* Timebase update, and/or requested timeout. */ -#define VIRQ_DEBUG 2 /* Request guest to dump debug info. */ -#define VIRQ_CONSOLE 3 /* (DOM0) bytes received on emergency console. */ -#define VIRQ_DOM_EXC 4 /* (DOM0) Exceptional event for some domain. */ -#define VIRQ_PARITY_ERR 5 /* (DOM0) NMI parity error. */ -#define VIRQ_IO_ERR 6 /* (DOM0) NMI I/O error. */ +#define VIRQ_TIMER 0 /* Timebase update, and/or requested timeout. */ +#define VIRQ_DEBUG 1 /* Request guest to dump debug info. */ +#define VIRQ_CONSOLE 2 /* (DOM0) bytes received on emergency console. */ +#define VIRQ_DOM_EXC 3 /* (DOM0) Exceptional event for some domain. */ +#define VIRQ_PARITY_ERR 4 /* (DOM0) NMI parity error. */ +#define VIRQ_IO_ERR 5 /* (DOM0) NMI I/O error. */ #define NR_VIRQS 7 /* diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index a138c64dda..355faa43c1 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -32,11 +32,12 @@ extern struct domain *dom0; typedef struct event_channel_st { #define ECS_FREE 0 /* Channel is available for use. */ -#define ECS_UNBOUND 1 /* Channel is waiting to bind to a remote domain. */ -#define ECS_INTERDOMAIN 2 /* Channel is bound to another domain. */ -#define ECS_PIRQ 3 /* Channel is bound to a physical IRQ line. */ -#define ECS_VIRQ 4 /* Channel is bound to a virtual IRQ line. */ -#define ECS_IPI 5 /* Channel is bound to a virtual IPI line. */ +#define ECS_RESERVED 1 /* Channel is reserved. */ +#define ECS_UNBOUND 2 /* Channel is waiting to bind to a remote domain. */ +#define ECS_INTERDOMAIN 3 /* Channel is bound to another domain. */ +#define ECS_PIRQ 4 /* Channel is bound to a physical IRQ line. */ +#define ECS_VIRQ 5 /* Channel is bound to a virtual IRQ line. */ +#define ECS_IPI 6 /* Channel is bound to a virtual IPI line. */ u16 state; union { struct { -- 2.30.2